/*
 * ip_forward.c
 *
 *  Created on: 2009-5-5
 *      Author: tian
 */

#include"myip.h"

int ip_forward(void * ptrpkg){
	struct iphdr *pheader=ptrpkg;
	unsigned int hdlen=pheader->ip_verhl.ip_hl*2;
	int rv=0;
	pheader->ip_ttl--;
	pheader->ip_sum=0;

	rv=ip_output(pheader,((char*)ptrpkg)+hdlen,pheader->ip_verhl.ip_len-pheader->ip_verhl.ip_hl*2);
	return rv;
}
